function showToken() {
    var tcd = document.getElementsByClassName("token-count-down");
    for (var i = 0; i < tcd.length; i++) { //class类不能简单直接拿来判断，因为具有多个class，所以要加上数组才能判断。
        tcd[i].style.display = "block";
    }
}
function hideToken() {
    var token = document.getElementsByClassName("token");
    for (var i = 0; i < token.length; i++) {
        token[i].style.display = "none";
    }
}

function getRandomString(len){
    let charStr = 'ABCDEFGHJKLMNOPQRSTUVWXYZ0123456789',
        min = 0,
        max = charStr.length-1,
        str = ''; //定义随机字符串 变量
    //判断是否指定长度，否则默认长度为5
    len = len || 5;
    //循环生成字符串
    for(var i = 0, index; i < len; i++)
    {
        index = (function(randomIndexFunc, i){
            return randomIndexFunc(min, max, i, randomIndexFunc);
        })(function(min, max, i, self){
            let indexTemp = Math.floor(Math.random()*(max-min+1)+min),
                numStart = charStr.length - 10;
            if(i == 0 && indexTemp >= numStart){
                indexTemp = self(min, max, i, self);
            }
            return indexTemp ;
        }, i);
        str += charStr[index];
    }
    return str;
}